<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>visibiltity显示与隐藏</title>

    <style>

        .baba {
            /* 隐藏元素继续占有原来的位置。visible-显示 hidden-隐藏 */
            visibility: hidden;
            width: 200px;
            height: 200px;
            background-color: pink;
        }

        .mama {
            width: 200px;
            height: 200px;
            background-color: skyblue;
        }

    </style>

</head>
<body>

    <img src="visibility隐藏元素.png" alt="">
    <br><br>
    
    <div class="baba">div1</div>
    <div class="mama">div2</div>

</body>
</html>